#pragma once
//------------------------------------------------------------------------
//
//  Name:   Miner.h
//
//  Desc:   A class defining a goldminer.
//
//  Author: Mat Buckland 2002 (fup@ai-junkie.com)
//
//------------------------------------------------------------------------

#include "../StateMachine/State.h"
#include "BattleState.h"

	class FightSM : public BaseEntity, public Component
	{
	private:

		//an instance of the state machine class
		StateMachine<FightSM>*  m_pStateMachine;

	public:

		FightSM(int id):BaseEntity(id),
			Component("FightSM")
		{
			m_pStateMachine = new StateMachine<FightSM>(this);

			m_pStateMachine->SetCurrentState(FightMainLoop::Instance());

			m_curFigCell=D3DXVECTOR3(0.0f,0.0f,0.0f);

			m_sleep=false;
		}

		~FightSM(){delete m_pStateMachine;}

		//this must be implemented
		void Update();

		StateMachine<FightSM>*  GetFSM()const{return m_pStateMachine;}

		void addedToObject();
		void SleepOn(Message const& msg);
		void SleepOff(Message const& msg);

		D3DXVECTOR3 m_curFigCell;
		bool m_sleep;
	};